﻿
function display(ids_to_show){
    var ids = ids_to_show.split('##');
    for(var i = 0; i < ids.length; ++i) document.getElementById(ids[i]).style.visibility = 'visible';
}

function hide(ids_to_hide){
    var ids = ids_to_hide.split('##');
    for(var i = 0; i < ids.length; ++i) document.getElementById(ids[i]).style.visibility = 'hidden';
}

function display_rub(ids_to_hide, id_to_show){
    var ids = ids_to_hide.split('##');
    for(var i = 0; i < ids.length; ++i) document.getElementById(ids[i]).style.display = 'none';
    
    document.getElementById(id_to_show).style.display = 'block';
}

function display_add_field(id){
    if('joueur'==document.getElementById(id).value){
        document.getElementById('d_info').style.display='none';
        document.getElementById('j_info').style.display='block';
    }
    else if('dirigeant'==document.getElementById(id).value){
        document.getElementById('d_info').style.display='block';
        document.getElementById('j_info').style.display='none';
    }
    else{
        document.getElementById('d_info').style.display='none';
        document.getElementById('j_info').style.display='none';
    }
}